home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 15 code / Floating Windows / Infinity Windoid WDEF 3.0 / Source Code / WindoidDefines.h < prev    next >
Encoding:
Text File  |  1995-02-20  |  7.5 KB  |  227 lines  |  [TEXT/MMCC]

  1. // *****************************************************************************
  2. //
  3. //    WindoidDefines.h
  4. //
  5. // —————————————————————————————————————————————————————————————————————————————
  6. //    Copyright © 1991-95 Infinity Systems.  All rights reserved.
  7. // —————————————————————————————————————————————————————————————————————————————
  8. //        This file contains only the #define’s used to determine how to compile
  9. //        the Infinity Windoid WDEF. By modifying only this file, you can choose
  10. //        what capabilities will be included when the WDEF is compiled.
  11. // *****************************************************************************
  12. #ifndef Infinity_WINDOIDDEFINES
  13. #define Infinity_WINDOIDDEFINES
  14.  
  15.  
  16. // —————————————————————————————————————————————————————————————————————————————
  17. //
  18. //    Conditional Compilation Options
  19. //
  20. // —————————————————————————————————————————————————————————————————————————————
  21. /*
  22.  
  23. The #define’s you may make include:
  24.  
  25. COMPLETE STYLES:
  26.  
  27.     qApple75Style -        This creates a WDEF that works and looks like the System
  28.                         7.5 floating window WDEF (ID 124). (It just turns on the
  29.                         previous two flags.)
  30.     
  31.     qMacAppStyle -        This determines if the varcodes that are supported are
  32.                         the one's I consider 'normal' or the ones MacApp's
  33.                         windoid WDEF knows about. Note, however, that this code
  34.                         only supports the “smaller”, title-less version that
  35.                         is available in MacApp’s.
  36.  
  37.     qThinkStyle -        This creates a version of the WDEF that is totally
  38.                         compatible with the varcodes used in the windoid WDEF 
  39.                         included with the THINK environments. 
  40.                     
  41.                         Two things are done: varcode 0 gives a normal titlebar, 
  42.                         varcode 2 gives a titlebar down the left side, and other 
  43.                         varcodes (i.e. 1,3,4,5,6,7) give no titlebar at all. 
  44.                         Also, for the THINK style, qAlwaysHilite is also set.
  45.     
  46. OPTION FLAGS:
  47.  
  48.     qApple75Varcodes -    This causes the Infinity Windoid to have the same
  49.                         behaviors as the System 7.5 floating window WDEF (ID 124)
  50.                         when the same varcodes are used.
  51.  
  52.     qAllowVert -        This determines if the windoid will support a floater 
  53.                         that has a vertical title bar along the left side of 
  54.                         the window.
  55.  
  56.     qAllowGrow -        This option creates a WDEF that supports a grow box. 
  57.                         This grow box behaves exactly like that of a standard 
  58.                         document window. This addition to the code was provided 
  59.                         to me by Jim Petrick.
  60.     
  61.     qAllowZoom -        This option creates a windoid that supports a zoombox.
  62.                     
  63.                         The application is responsible for setting the user state 
  64.                         and standard state Rects of the window for zooming. (When 
  65.                         a new window is created, both of these are initialized to 
  66.                         the bounds of the window. See the README for more 
  67.                         information).
  68.  
  69.     qUseGestalt -        Define this if you want to use Gestalt to determine the
  70.                         System and QuickDraw versions. Otherwise, SysEnvirons is
  71.                         used. (NOTE: using Gestalt in MPW will cause additional
  72.                         glue code to be attached to the WDEF resource, making it
  73.                         larger.)
  74.  
  75.     SystemSevenOrLater -A standard Apple header flag.  If this flag is set, 
  76.                         a version of the WDEF that doesn't support the System 6 
  77.                         coloring will be compiled. Note that this version may 
  78.                         crash on systems earlier than 7.0, so your application 
  79.                         should make sure to check for System 7 or later.
  80.                     
  81.  
  82. APPEARANCE MODIFICATION:
  83.                     
  84.     qApple75Design -    This causes the Infinity Windoid to assume the 
  85.                         appearance of the System 7.5 floating window WDEF 
  86.                         (ID 124).
  87.                     
  88.     qSmallGrow -        This option will cause the grow box to be drawn smaller
  89.                         than the standard size.
  90.  
  91.     qTitleString -        When enabled, the windoid’s title will appear centered  
  92.                         in the titlebar. 
  93.                     
  94.                         This feature does not look at the script and change the
  95.                         size of the titlebar as is recommended for regions with  
  96.                         an application font that doesn't work at 9 points. 
  97.                     
  98.  
  99. BEHAVIOR MODIFICATION:
  100.  
  101.     qStayputZoom -        This option will cause both the user and standard Rects 
  102.                         to be changed together, causing the zoomed in and out 
  103.                         state to have the same topLeft at all times.  If this is 
  104.                         not set, the standard and user states have their own 
  105.                         ‘memories’.
  106.  
  107.  
  108. NO LONGER SUPPORTED:
  109.  
  110.     VERS_2_2_COMPATIBLE -    Removed in 3.0.
  111.  
  112.     DONT_ALIGN_ZOOM -        Removed in 3.0.  
  113.  
  114.     NOT_PBOOK_AWARE -        Removed in 3.0.  The WDEF will now always check  
  115.                             for a PowerBook’s passive matrix screen like the 
  116.                             System does.
  117.  
  118.     MFI_ZOOM -                Removed in 3.0.  The application can create this
  119.                             windoid ‘shrinking’ behavior by setting the zoom
  120.                             rectangle information in the window’s dataHandle
  121.                             directly (as described in IM: Toolbox Essentials).
  122.  
  123.     THICK_TITLEBAR -         Removed in 3.0.  I’ve grown to like this so much 
  124.                             more than the (original) thin version of the 
  125.                             titlebar that this is now to only way to compile 
  126.                             it (i.e. it is always on).
  127.                             
  128.     ALWAYS_HILITE -            Removed in 3.0.  This function can be activated
  129.                             by using an appropriate variation code (subtracting
  130.                             1 from the constants given in InfinityWindoid.h).
  131.  
  132.         If you depend on any of the above compiler options that are no longer
  133.         supported, you can either use a previous version of the WDEF or make
  134.         the necessary modifications to this version (none of them were overly
  135.         complicated).
  136.         
  137.         Also removed are support for non-universal headers and for System 6
  138.         coloring (with Kolor or a similar control panel) -- although System 6
  139.         black and white support is still included by default.  These would
  140.         probably be more difficult to add back in, so if you want them, you
  141.         would be best going back to version 2.6.
  142.  
  143. ------------------------------------------------------------------------------*/
  144.  
  145. #define qApple75Style        0
  146. #define qApple75Varcodes    1
  147.  
  148. #define qTitleString        1
  149.  
  150. #define qAllowZoom            1
  151. #define qAllowGrow            1
  152. #define qAllowVert            1
  153.  
  154. #define qStayputZoom        0
  155.  
  156.  
  157. // —————————————————————————————————————————————————————————————————————————————
  158. //
  159. //    Combinations
  160. //
  161. // —————————————————————————————————————————————————————————————————————————————
  162. //        These should pretty much remain untouched.
  163. // —————————————————————————————————————————————————————————————————————————————
  164. #if qApple75Style
  165.     #undef  qApple75Design
  166.     #define qApple75Design        1
  167.  
  168.     #undef  qApple75Varcodes
  169.     #define qApple75Varcodes    1
  170.  
  171.     #undef  qAllowZoom
  172.     #define qAllowZoom            1
  173.     
  174.     #undef  qAllowGrow
  175.     #define qAllowGrow            1
  176.  
  177.     #undef  qAllowVert
  178.     #define qAllowVert            1
  179. #endif
  180.  
  181.  
  182. // —————————————————————————————————————————————————————————————————————————————
  183. #if qApple75Design
  184.     #undef  qTitleString
  185.     #define qTitleString        1
  186. #endif
  187.  
  188.  
  189. // —————————————————————————————————————————————————————————————————————————————
  190. #if qThinkStyle
  191.     #undef  qAllowVert
  192.     #define qAllowVert            1
  193.     
  194.     #undef  qAlwaysHilite
  195.     #define qAlwaysHilite        1
  196.  
  197.     #undef  qMacAppStyle
  198.     #define qMacAppStyle        0
  199. #endif
  200.  
  201.  
  202. // —————————————————————————————————————————————————————————————————————————————
  203. #if qMacAppStyle
  204.     #undef  qAllowVert
  205.     #define qAllowVert            0
  206.     
  207.     #undef  qAlwaysHilite
  208.     #define qAlwaysHilite        0
  209.  
  210.     #undef  qAllowGrow
  211.     #define qAllowGrow            1
  212. #endif
  213.  
  214.  
  215. // —————————————————————————————————————————————————————————————————————————————
  216. //
  217. //    System version define
  218. //
  219. // —————————————————————————————————————————————————————————————————————————————
  220. #define SystemSixOrLater    1
  221.     // This is used so that we can cut down on the code size in MPW. If 
  222.     // support for earlier systems is important, get rid of this. 
  223.     // Note: for this define to work, MacHeaders cannot be used.
  224.  
  225.  
  226. // —————————————————————————————————————————————————————————————————————————————
  227. #endif